import {request} from "../../static/core/request";

// 电站方案详情
export function getPlanDetail(entryId) {
  return request({ url: 'customer/viewMatchedPlan', method: 'get', data : { entryId } });
}

// 获取方案规格
export function getElectricPlanAll() {
  return request({ url: 'applet/getElectricPlanAll', method: 'get', });
}

// 安装详情
export function getUsedMaterialInfoApi(entryId, warehouseId) {
  return request({ url: 'applet/getUsedMaterialInfo', method: 'get', data : { entryId } });
}
// 安装验收驳回
export function fixAcceptRefuseApi(data) {
  return request({ url: 'customer/fixAcceptRefuse', method: 'post', data });
}
// 安装验收通过
export function fixAcceptPassApi(data) {
  return request({ url: 'customer/fixAcceptPass', method: 'post', data });
}
// 安装页面组件列表 entryId、type、warehouseId
export function getUsedMaterialListApi(data) {
  return request({ url: 'applet/getMateriallist', method: 'get', data });
}
// 安装页面删除模块
export function deleteUsedRecordApi(ids) {
  return request({ url: 'applet/deleteUsedRecord', method: 'get', data : { ids } });
}
// 获取验收报告详情
export function getAcceptInfoApi(entryId) {
  return request({ url: 'customer/mergeAccept', method: 'get', data : { entryId } });
}
// 安装页面素材扫码
export function scanMaterialApi(data) {
  return request({ url: 'applet/usedMaterial', method: 'get', data });
}
// 安装页面-获取仓库列表
export function getWarehouseListApi(userId) {
  return request({ url: 'supply/warehouse/list', method: 'get', data : { userId } });
}
// 安装页面-安装暂存
export function installZcApi(data) {
  return request({ url: `applet/installZc?entryId=${data.entryId}`, method: 'post', data });
}
// 安装页面-安装暂存
export function installApi(data) {
  return request({ url: `applet/install?entryId=${data.entryId}`, method: 'post', data });
}
// 安装页安装支架并网箱
export function usedMaterialOtherAtherApi(data) {
  return request({ url: 'applet/usedMaterialOther', method: 'post', data });
}
// 并网-暂存
export function mergeTmpApi(data) {
  return request({ url: `customer/mergeTmp?id=${data.id}`, method: 'post', data });
}

// 并网-提交
export function mergeSubmitApi(data) {
  return request({ url: `customer/mergeSubmit?id=${data.id}`, method: 'post', data });
}

// 合同签署
export function inviteSignQrApi(data) {
  return request({ url: 'customer/inviteSignQr', method: 'post', data });
}

// 并网验收通过
export function mergeAcceptPassApi(data) {
  return request({ url: `customer/mergeAcceptPass?id=${data.id}`, method: 'post', data });
}
// 并网验收驳回
export function mergeAcceptRefuse(data) {
  return request({ url: `customer/mergeAcceptRefuse?id=${data.id}`, method: 'post', data });
}

